home *** CD-ROM | disk | FTP | other *** search
- % A demonstration script for Asymptote
-
- % ¥ To run the demo:
- % - Select "Run Recorder"
- % from the Script menu.
-
- % ¥ To experiment with Asymptote more:
- % - Select "New Recorder" from the
- % File>Recorder menu.
- % - Select "Clear" from the Graph menu
-
- % ¥ For a brief guide to creating graphs
- % with Asymptote, please read the
- % "Getting Started" chapter contained
- % in this demo.
-
- if undefined demoNumber then set demoNumber 1 $
- else if demoNumber 14 >= then set demoNumber 1 $
- else set demoNumber demoNumber 1 +
-
- % Ask which demo to run
- set demoNumber ?Welcome to Asymptote $
- Which demo (1 through 14) would you like to see?
-
- if demoNumber 1 < demoNumber 14 > + then stop
-
- % Run the demo script (\demoNumber inserts the number into the script name)
- Demo\demoNumber
-
- % Close that script now that we are done with it
- close Demo\demoNumber
-
- graphunits cm % Display the graph cursor information in centimeters
- cursor % Activate the graph cursor
-
- set response true
- ask response Yes No Are you really done viewing this demo?
- if response false = then cursor
- graphunits inches % Switch back to inches (the demo scripts were written for inches)
-
- set PrintIt false % Make false the default choice
- ask PrintIt Yes No Do you want to print the graph?
- if PrintIt then print % Print the graph if PrintIt is true
-
- fullscreen no
-
- set response true
- ask response OK " " ?To try a different demo select Run Recorder from the Script menu.
-
- % Clear out the vectors
- rpn 0 >y >x >e >p
- npts 0